home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / apidev / spxcon.arc / CONNECT.H < prev    next >
C/C++ Source or Header  |  1987-12-01  |  3KB  |  93 lines

  1. /*****************************************************************************
  2.  *
  3.  * Program Name:  CONNECT
  4.  *
  5.  * Filename:      connect.h
  6.  *
  7.  * Date Created:  December 1, 1987
  8.  *
  9.  * Programmers:      Bryan Sparks
  10.  *                  Software Consultant
  11.  *                    API Consulting
  12.  *                  Novell Inc.
  13.  *
  14.  * Files used:      connect.c
  15.  *
  16.  * Comments:
  17.  *    This file contains the definitions for SPX and IPX functions.
  18.  *    You will notice that in some of the definitions a "far" directive
  19.  *    is used.  This is a Microsoft C feature and I am not sure if other
  20.  *    C compilers allow such a declaration.  If you use a language that
  21.  *    does not support such a feature then you will have to use your
  22.  *    imagination to come up with another scheme of assigning addresses.
  23.  *    I do know that Lattice C has a function called "makepv" which may suit
  24.  *    your purposes in this area.
  25.  *
  26.  *    The definitions for the following structures are taken from the 
  27.  *    "Peer-to-Peer Communication Protocols" document.  See Developer's
  28.  *    Update" article for more information in obtaining this document.
  29.  ****************************************************************************/
  30. #ifndef        TRUE
  31. #define        TRUE        1
  32. #endif
  33. #ifndef        FALSE
  34. #define        FALSE        0
  35. #endif
  36.  
  37. #define        DATASIZE    100
  38.  
  39. struct    IPXAddress
  40. {
  41.     unsigned char    Network[4];    /* high-low */
  42.     unsigned char    Node[6];    /* high-low */
  43.     unsigned int     Socket;        /* high-low */
  44. };
  45.  
  46. typedef struct IPXPacketStructure
  47. {
  48.     unsigned int                PacketCheckSum;            /* high-low */
  49.     unsigned int                PacketLength;            /* high-low */
  50.     unsigned char                PacketTransportControl;
  51.     unsigned char                PacketType;
  52.     struct IPXAddress            Destination;
  53.     struct IPXAddress            Source;
  54. } IPXPacket;
  55.  
  56. typedef struct SPXPacketStructure
  57. {
  58.     unsigned int                PacketCheckSum;            /* high-low */
  59.      unsigned int                PacketLength;            /* high-low */
  60.     unsigned char                PacketTransportControl;
  61.     unsigned char                PacketType;
  62.     struct IPXAddress            Destination;
  63.     struct IPXAddress            Source;
  64.     unsigned char                ConnectionControl;
  65.     unsigned char                DatastreamType;
  66.     unsigned int                SourceConnectionID;        /* high-low */
  67.     unsigned int                DestinationConnectionID;    /* high-low */
  68.     unsigned int                SequenceNumber;            /* high-low */
  69.     unsigned int                AcknowledgeNumber;         /* high-low */
  70.     unsigned int                AllocationNumber;        /* high-low */
  71. } SPXPacket;
  72.  
  73. struct    ECBFragment
  74. {
  75.     char far             *Address; 
  76.     unsigned int        Size;             /* low-high */
  77. };
  78.  
  79. typedef struct ECBStructure 
  80. {
  81.     unsigned int                Link[2];                
  82.     char far                    *ESRAddress;            /* offset-segment */
  83.     unsigned char                InUseFlag;
  84.     unsigned char                CompletionCode;
  85.     unsigned int                ECBSocket;                /* high-low */
  86.     unsigned char                IPXWorkspace[4];        
  87.     unsigned char                DriverWorkspace[12];    
  88.     unsigned char                ImmediateAddress[6];    /* high-low */
  89.     unsigned int                FragmentCount;            /* low-high */
  90.     struct ECBFragment            FragmentDescriptor[2];
  91. } ECB;
  92.  
  93.